package config

const (
	LogMessage           = "git.bingyan.net/Foreverxxh/HustBus/controller"
	DefaultCronTime      = "*/5 * 6-22 * * *" // 默认定时器执行时间:每 5s
	ChangeroutrCronTime1 = "0 0 6 * * *"      //每天凌晨6点
	ChangeroutrCronTime2 = "0 0 18 * * *"     //每天下午6点
	ChangeroutrCronTime3 = "0 0 0 1 * ?"      //每月第一天凌晨0点

	WechatSessionURIPrefix = "https://api.weixin.qq.com/sns/jscode2session"
	WechatTokenURIPrefix   = "https://api.weixin.qq.com/cgi-bin/token"
	WechatOpenUserInfo     = "https://api.weixin.qq.com/sns/userinfo"
	WeixinMsgSecCheckURI   = "https://api.weixin.qq.com/wxa/msg_sec_check"
	WeixinImgSecCheckURI   = "https://api.weixin.qq.com/wxa/img_sec_check"
	WeixinGetTokenURI      = "https://api.weixin.qq.com/cgi-bin/token"

	QUEUELENG         = 40                               //队列长度（每5秒更新一次）
	BusMessageExpTime = 60                               //校车信息过期时间  60s
	BusMinVertDis     = 20.0                             //判断校车可以映射到垂直点的最大距离
	BusMinStationDis  = 10.0                             //判断校车在出发、终点站的最大距离
	IsMove            = 3.0                              //判断其是否在移动的下限距离(每3s的移动距离)
	IsInLine          = 2.5                              //判定在此线段上的最大垂直距
	LatDisOnLat       = 10 / (111000 * 2 * 0.8615405652) //经线上每一度大致为为111*cosb km b为纬线纬度 cos（30.51）= 0.8615405652 //求垂直点时，允许超出端点纬度的值
	LonDisOnLon       = 10 / (111000 * 2)                //经线上每一度大致为为111km //求垂直点时，允许超出端点经度的值
	/****************************************** token ****************************************/
	TokenQiniuExpire = 7200
	// JWT
	JWTContextKey = "Bus"

	ErrorMsgParamWrong = "param wrong"

	GPSUrl = "https://evapi.hzncc.cn/api/vehicle/all?groupId=2"

	BusNum   = 16
	RouteNum = 3 //路线数量

	LoginSecret = "HustBus"

	// img suffix
	ImgSuffix = ".jpg"

	// 图片做缩略处理：w: 160, h: 160
	ImgOps       = "imageView2/2/w/160/h/160"
	ImgURIPrefix = "https://image.hustbus.hust.online/"
	ImgMicroSize = 160

	ImgPrefixHustbusLostPropertyImg      = "hustbus/LostProperty/"
	ImgPrefixMicroHustbusLostPropertyImg = "hustbus/LostProperty/micro/"
)

var (
	ImgPrefix = map[int]string{
		0: ImgPrefixHustbusLostPropertyImg,
	}
	ImgPrefixMicro = map[int]string{
		0: ImgPrefixMicroHustbusLostPropertyImg,
	}
)
